// 终端购物车
const {DataTypes, db } = require("../db");
db.define('cartZd', {
id: {type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true,comment:'表自增ID'},
tenantId:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
buId:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
invId:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
unit:{type: DataTypes.STRING(12),allowNull:false,comment:''}, 
qty:{type: DataTypes.INTEGER,allowNull:false,comment:''}, 
unitId:{type: DataTypes.INTEGER,comment:''}, 

}, {
    tableName: 'cart_zd',
    timestamps: false,
    comment: '终端购物车',
    indexes:[{"unique":true,"name":"购物车商品唯一","fields":["tenantId"," invId"," buId"," unit"]}]
});